package com.atguigu.userprofile.common.dao;

import com.atguigu.userprofile.common.bean.TagInfo;
import com.atguigu.userprofile.common.util.MySQLUtil;

import java.util.List;

public class TagInfoDAO {

    public static TagInfo getTagInfoByTaskId(String taskId){
        TagInfo tagInfo = MySQLUtil.queryOne("select * from tag_info where tag_task_id='"+taskId+"'", TagInfo.class, true);
        return tagInfo;
    }


    public  static List<TagInfo> getTagInfoListWithOn(){
        String sql="select ti.* from tag_info ti join task_info tk on ti.tag_task_id = tk.id   where   tk.task_status='1'";
        List<TagInfo> tagInfoList = MySQLUtil.queryList(sql, TagInfo.class, true);
        return  tagInfoList;
    }
}
